var svg = "";
function starup() {
    //创建svg对象
    svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
    svg.setAttribute("width", "100%");
    svg.setAttribute("height", "100%");
    document.body.appendChild(svg);
    objcd[0] = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    objcd[0].setAttribute("stroke-width", "2");
    objcd[0].setAttribute("stroke", "black");
    objcd[0].setAttribute("r", "10");
    objcd[0].setAttribute("cx", "840");
    objcd[0].setAttribute("cy", "98");
    objcd[0].setAttribute("fill", "green");
    objcd[0].setAttribute("id", "MaNiLa");
    objcd[0].setAttribute("onclick", "editCd(this)");
    objcd[0].setAttribute("onmousedown", "comPathDown(this)");
    objcd[0].setAttribute("onmouseup", "comPathUpE(this)");
    objcd[0].setAttribute("text", "马尼拉");
    $("svg").append(objcd[0]);
    objcd[1] = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    objcd[1].setAttribute("stroke-width", "2");
    objcd[1].setAttribute("stroke", "black");
    objcd[1].setAttribute("r", "10");
    objcd[1].setAttribute("cx", "560");
    objcd[1].setAttribute("cy", "463");
    objcd[1].setAttribute("fill", "green");
    objcd[1].setAttribute("id", "WenLai");
    objcd[1].setAttribute("onclick", "editCd(this)");
    objcd[1].setAttribute("text", "文莱");
    objcd[1].setAttribute("onmousedown", "comPathDown(this)");
    objcd[1].setAttribute("onmouseup", "comPathUpE(this)");
    $("svg").append(objcd[1]);
    objcd[2] = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    objcd[2].setAttribute("stroke-width", "2");
    objcd[2].setAttribute("stroke", "black");
    objcd[2].setAttribute("r", "10");
    objcd[2].setAttribute("cx", "408");
    objcd[2].setAttribute("cy", "226");
    objcd[2].setAttribute("fill", "green");
    objcd[2].setAttribute("id", "XiGong");
    objcd[2].setAttribute("onclick", "editCd(this)");
    objcd[2].setAttribute("text", "西贡");
    objcd[2].setAttribute("onmousedown", "comPathDown(this)");
    objcd[2].setAttribute("onmouseup", "comPathUpE(this)");
    $("svg").append(objcd[2]);
    objcd[3] = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    objcd[3].setAttribute("stroke-width", "2");
    objcd[3].setAttribute("stroke", "black");
    objcd[3].setAttribute("r", "10");
    objcd[3].setAttribute("cx", "416");
    objcd[3].setAttribute("cy", "750");
    objcd[3].setAttribute("fill", "green");
    objcd[3].setAttribute("id", "YaJiaDa");
    objcd[3].setAttribute("onclick", "editCd(this)");
    objcd[3].setAttribute("text", "雅加达");
    objcd[3].setAttribute("onmousedown", "comPathDown(this)");
    objcd[3].setAttribute("onmouseup", "comPathUpE(this)");
    $("svg").append(objcd[3]);
    objcd[4] = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    objcd[4].setAttribute("stroke-width", "2");
    objcd[4].setAttribute("stroke", "black");
    objcd[4].setAttribute("r", "10");
    objcd[4].setAttribute("cx", "245");
    objcd[4].setAttribute("cy", "473");
    objcd[4].setAttribute("fill", "green");
    objcd[4].setAttribute("id", "MaLiuJia");
    objcd[4].setAttribute("onclick", "editCd(this)");
    objcd[4].setAttribute("text", "马六甲");
    objcd[4].setAttribute("onmousedown", "comPathDown(this)");
    objcd[4].setAttribute("onmouseup", "comPathUpE(this)");
    $("svg").append(objcd[4]);
    objcd[5] = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    objcd[5].setAttribute("stroke-width", "2");
    objcd[5].setAttribute("stroke", "black");
    objcd[5].setAttribute("r", "10");
    objcd[5].setAttribute("cx", "41");
    objcd[5].setAttribute("cy", "380");
    objcd[5].setAttribute("fill", "green");
    objcd[5].setAttribute("id", "AZhen");
    objcd[5].setAttribute("onclick", "editCd(this)");
    objcd[5].setAttribute("text", "阿镇");
    objcd[5].setAttribute("onmousedown", "comPathDown(this)");
    objcd[5].setAttribute("onmouseup", "comPathUpE(this)");
    $("svg").append(objcd[5]);
    objcd[6] = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    objcd[6].setAttribute("stroke-width", "2");
    objcd[6].setAttribute("stroke", "black");
    objcd[6].setAttribute("r", "10");
    objcd[6].setAttribute("cx", "88");
    objcd[6].setAttribute("cy", "51");
    objcd[6].setAttribute("fill", "green");
    objcd[6].setAttribute("id", "AnMan");
    objcd[6].setAttribute("onclick", "editCd(this)");
    objcd[6].setAttribute("text", "安曼");
    objcd[6].setAttribute("onmousedown", "comPathDown(this)");
    objcd[6].setAttribute("onmouseup", "comPathUpE(this)");
    $("svg").append(objcd[6]);
    //添加事件 
    objcyc[0] = document.createElementNS("http://www.w3.org/2000/svg", "path");
    objcyc[0].setAttribute("stroke-width", "1");
    objcyc[0].setAttribute("stroke", "black");
    // objcyc[0].setAttribute("r", "10");
    // objcyc[0].setAttribute("cx", "0");
    // objcyc[0].setAttribute("cy", "0");
    objcyc[0].setAttribute("d", "m0,-15c0,-1.117736 0.756735,-2.023103 1.690974,-2.023103c0.93424,0 1.690972,0.905367 1.690972,2.023103c0,1.117736 -0.756732,2.023103 -1.690972,2.023103c-0.93424,0 -1.690974,-0.905367 -1.690974,-2.023103zm5.685342,5.726673l0,-1.021725c0,-1.075005 -0.727991,-1.946605 -1.627034,-1.946605l-4.739906,0c-0.898523,0 -1.627034,0.8716 -1.627034,1.946605l0,1.021725c-0.001571,0.023191 -0.00262,0.047012 -0.00262,0.071144l0,5.884949c0,0.457269 0.309639,0.827722 0.691838,0.827722c0.381676,0 0.692098,-0.370454 0.692098,-0.827722l0,-5.797819l0.463931,0l0,6.626166l0.003405,0l0,9.362574c0,0.608645 0.413113,1.10321 0.922362,1.10321c0.509512,0 0.922362,-0.493937 0.922362,-1.10321l0,-9.362574l0.608534,0l0,9.362574c0,0.608645 0.413368,1.10321 0.922361,1.10321c0.50951,0 0.92236,-0.493937 0.92236,-1.10321l0,-9.362574l0.002882,0l0,-6.626166l0.463932,0l0,5.797503c0,0.45727 0.310421,0.828036 0.692099,0.828036c0.382204,0 0.691838,-0.370766 0.691838,-0.828036l0,-5.884947c-0.00026,-0.024446 -0.001834,-0.047639 -0.003406,-0.070831l0,0.000001z");
    objcyc[0].setAttribute("fill", "red");
    objcyc[0].setAttribute("id", "circle");
    $("svg").append(objcyc[0]);
}